package Day2025_04_15;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long a = in.nextLong(), h = in.nextLong();
        long b = in.nextLong(), k = in.nextLong();
        long ret = 0;
        while (h > 0 && k > 0) {
            ret += a;
            ret += b;
            h -= b;
            k -= a;
        }
        if (h < 0 && k > 0) {
            ret += 10l * b;
        }
        if (h > 0 && k < 0) {
            ret += 10l * a;
        }
        System.out.println(ret);
    }
}
